Support "*" for all locales with least priority when to select default im
authorHidetoshi Tajima <tajima@src.gnome.org>
Thu, 18 Oct 2001 22:35:15 +0000 (22:35 +0000)
committerHidetoshi Tajima <tajima@src.gnome.org>
Thu, 18 Oct 2001 22:35:15 +0000 (22:35 +0000)
* gtk/gtkimmodule.c (match_locale):
Support "*" for all locales with least priority
when to select default im module, #58201

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkimmodule.c

index 071cd05466230e48e87faf22c1c9ed9c5f7ce6cc..af15c915b0fb6197c70f49a461471aefbdf953c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-18  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkimmodule.c (match_locale):
+       Support "*" for all locales with least priority
+       when to select default im module, #58201
+
 2001-10-18  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): 
index 071cd05466230e48e87faf22c1c9ed9c5f7ce6cc..af15c915b0fb6197c70f49a461471aefbdf953c9 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkimmodule.c (match_locale):
+       Support "*" for all locales with least priority
+       when to select default im module, #58201
+
 2001-10-18  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): 
index 071cd05466230e48e87faf22c1c9ed9c5f7ce6cc..af15c915b0fb6197c70f49a461471aefbdf953c9 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkimmodule.c (match_locale):
+       Support "*" for all locales with least priority
+       when to select default im module, #58201
+
 2001-10-18  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): 
index 071cd05466230e48e87faf22c1c9ed9c5f7ce6cc..af15c915b0fb6197c70f49a461471aefbdf953c9 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkimmodule.c (match_locale):
+       Support "*" for all locales with least priority
+       when to select default im module, #58201
+
 2001-10-18  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): 
index 071cd05466230e48e87faf22c1c9ed9c5f7ce6cc..af15c915b0fb6197c70f49a461471aefbdf953c9 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkimmodule.c (match_locale):
+       Support "*" for all locales with least priority
+       when to select default im module, #58201
+
 2001-10-18  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): 
index 071cd05466230e48e87faf22c1c9ed9c5f7ce6cc..af15c915b0fb6197c70f49a461471aefbdf953c9 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkimmodule.c (match_locale):
+       Support "*" for all locales with least priority
+       when to select default im module, #58201
+
 2001-10-18  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): 
index 071cd05466230e48e87faf22c1c9ed9c5f7ce6cc..af15c915b0fb6197c70f49a461471aefbdf953c9 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-18  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkimmodule.c (match_locale):
+       Support "*" for all locales with least priority
+       when to select default im module, #58201
+
 2001-10-18  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): 
index 7d882a293ecad45bad2c8cdc5314df85e8247262..1086d9fc6d42666d4bea01573c99fe86c36444ad 100644 (file)
@@ -441,20 +441,24 @@ _gtk_im_module_create (const gchar *context_id)
 
 /* Match @locale against @against.
  * 
- * 'en_US' against 'en_US'       => 3
- * 'en_US' against 'en'          => 2
- * 'en', 'en_UK' against 'en_US' => 1
+ * 'en_US' against 'en_US'       => 4
+ * 'en_US' against 'en'          => 3
+ * 'en', 'en_UK' against 'en_US' => 2
+ *  all locales, against '*'    => 1
  */
 static gint
 match_locale (const gchar *locale,
              const gchar *against,
              gint         against_len)
 {
+  if (strcmp (against, "*") == 0)
+    return 1;
+
   if (strcmp (locale, against) == 0)
-    return 3;
+    return 4;
 
   if (strncmp (locale, against, 2) == 0)
-    return (against_len == 2) ? 2 : 1;
+    return (against_len == 2) ? 3 : 2;
 
   return 0;
 }